BIN     = ../bin/libsocket_client.so
PKG_FLAGS= `pkg-config --cflags --libs gtk+-3.0 gthread-2.0 glib-2.0 libcurl`
#LIBS=-L$(LIBPATH) -lglib-2.0
LIBPATH = ../bin
LIBS=-L$(LIBPATH) -lglib-2.0 -lcurl -lxml2 -lprinter_sys
INCLUDE = -I /usr/include/glib-2.0 \
		  -I /usr/include/libxml2\
		  -I /usr/include\
  		  -I../gtk_gui\
  		  -I../sys\
		  -I../bin

OBJ     = socket_client.o http_client.o xml_client.o
SRCS     = socket_client.c http_client.c xml_client.c


$(BIN) : $(OBJ)
		$(CC) $(CCFLAGS) -shared -o $(BIN) $(OBJ) $(LIBS) $(PKG_FLAGS)

.c.o:
		$(CC) $(CCFLAGS) -c $< $(PKG_FLAGS) $(INCLUDE) $(LIBS) 

#$(OBJ) : $(SRCS) 
#		$(CC) $(CCFLAGS) -c -o $@ $^ $(LIBS) $(PKG_FLAGS) $(INCLUDE)
		
.PHONY : clean
clean :
	-rm -f $(BIN) $(OBJ)
    
